package com.lin.activity;

import java.util.List;

import com.yunfeng.supercall.R;
import com.yunfeng.supercall.bean.ChatMessageBean;
import com.yunfeng.supercall.manager.ChatMessageManager;

import android.app.Activity;
import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;

public class TestActivity2 extends Activity implements OnClickListener{
	ChatMessageManager mChatMessageManager;

	private Button button;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_test);
		button = (Button) findViewById(R.id.button1);
		button.setOnClickListener(this);
	}

	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v == button) {
			mChatMessageManager = ChatMessageManager.getInstance(this);
			List<ChatMessageBean> chatMessages = mChatMessageManager
					.findAllChatMessages();
			Log.i("tag", chatMessages.toString());
		}
	}
	
}